package graphicsExtended;

import graphicsExtended.templates.interfaces.Drawable;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

/**
 *
 * Fully Tested: No
 * Fully Documented: No
 * Created: 3-Jun-2012
 * Last Updated: 3-Jun-2012
 *
 * @author Shimu Wu
 */
public class Background2D implements Drawable{
    
    private final Rectangle2D rectangle;

    private final Color backgroundColor;
    
    /**
     * Instantiates a Background2D with the given width, height,
     * and backgroundColor.
     * 
     * @param screenWidth
     * @param screenHeight
     * @param backgroundColor 
     */
    public Background2D(int screenWidth, int screenHeight, 
            Color backgroundColor) {
        this.rectangle = new Rectangle2D.Double(0, 0,
            screenWidth, screenHeight);
        this.backgroundColor = backgroundColor;
    }

    /**
     * Draws the given background.
     * 
     * @param g 
     */
    @Override
    public void draw(Graphics2D g) {
        g.setColor(backgroundColor);
        g.fill(rectangle);
    }
    
    
}
